3.1.13 \(\int (a+b \log (c x^n))^2 \log (1+e x) \, dx\) [13]

Optimal. Leaf size=193 \[ 2 a b n x-6 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2+\frac {2 b^2 n^2 (1+e x) \log (1+e x)}{e}-\frac {2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}-\frac {2 b^2 n^2 \text {Li}_2(-e x)}{e}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2(-e x)}{e}-\frac {2 b^2 n^2 \text {Li}_3(-e x)}{e} \]

[Out]

2*a*b*n*x-6*b^2*n^2*x+2*b^2*n*x*ln(c*x^n)+2*b*n*x*(a+b*ln(c*x^n))-x*(a+b*ln(c*x^n))^2+2*b^2*n^2*(e*x+1)*ln(e*x
+1)/e-2*b*n*(e*x+1)*(a+b*ln(c*x^n))*ln(e*x+1)/e+(e*x+1)*(a+b*ln(c*x^n))^2*ln(e*x+1)/e-2*b^2*n^2*polylog(2,-e*x
)/e+2*b*n*(a+b*ln(c*x^n))*polylog(2,-e*x)/e-2*b^2*n^2*polylog(3,-e*x)/e

________________________________________________________________________________________

Rubi [A]
time = 0.24, antiderivative size = 193, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 12, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.632, Rules used = {2436, 2332, 2417, 2388, 2338, 6874, 2458, 45, 2393, 2352, 2421, 6724} \begin {gather*} \frac {2 b n \text {PolyLog}(2,-e x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac {2 b^2 n^2 \text {PolyLog}(2,-e x)}{e}-\frac {2 b^2 n^2 \text {PolyLog}(3,-e x)}{e}-\frac {2 b n (e x+1) \log (e x+1) \left (a+b \log \left (c x^n\right )\right )}{e}+\frac {(e x+1) \log (e x+1) \left (a+b \log \left (c x^n\right )\right )^2}{e}+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2+2 a b n x+2 b^2 n x \log \left (c x^n\right )+\frac {2 b^2 n^2 (e x+1) \log (e x+1)}{e}-6 b^2 n^2 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2*Log[1 + e*x],x]

[Out]

2*a*b*n*x - 6*b^2*n^2*x + 2*b^2*n*x*Log[c*x^n] + 2*b*n*x*(a + b*Log[c*x^n]) - x*(a + b*Log[c*x^n])^2 + (2*b^2*
n^2*(1 + e*x)*Log[1 + e*x])/e - (2*b*n*(1 + e*x)*(a + b*Log[c*x^n])*Log[1 + e*x])/e + ((1 + e*x)*(a + b*Log[c*
x^n])^2*Log[1 + e*x])/e - (2*b^2*n^2*PolyLog[2, -(e*x)])/e + (2*b*n*(a + b*Log[c*x^n])*PolyLog[2, -(e*x)])/e -
 (2*b^2*n^2*PolyLog[3, -(e*x)])/e

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2388

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[(d
+ e*x)^(q - 1)*((a + b*Log[c*x^n])^p/x), x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 2393

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2417

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> With[
{u = IntHide[Log[d*(e + f*x^m)^r], x]}, Dist[(a + b*Log[c*x^n])^p, u, x] - Dist[b*n*p, Int[Dist[(a + b*Log[c*x
^n])^(p - 1)/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && RationalQ[m] && (EqQ[
p, 1] || (FractionQ[m] && IntegerQ[1/m]) || (EqQ[r, 1] && EqQ[m, 1] && EqQ[d*e, 1]))

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x) \, dx &=-x \left (a+b \log \left (c x^n\right )\right )^2+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}-(2 b n) \int \left (-a-b \log \left (c x^n\right )+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e x}\right ) \, dx\\ &=2 a b n x-x \left (a+b \log \left (c x^n\right )\right )^2+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\left (2 b^2 n\right ) \int \log \left (c x^n\right ) \, dx-\frac {(2 b n) \int \frac {(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x} \, dx}{e}\\ &=2 a b n x-2 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )-x \left (a+b \log \left (c x^n\right )\right )^2+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}-\frac {(2 b n) \int \left (e \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)+\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x}\right ) \, dx}{e}\\ &=2 a b n x-2 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )-x \left (a+b \log \left (c x^n\right )\right )^2+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}-(2 b n) \int \left (a+b \log \left (c x^n\right )\right ) \log (1+e x) \, dx-\frac {(2 b n) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{x} \, dx}{e}\\ &=2 a b n x-2 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2-\frac {2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2(-e x)}{e}+\left (2 b^2 n^2\right ) \int \left (-1+\frac {(1+e x) \log (1+e x)}{e x}\right ) \, dx-\frac {\left (2 b^2 n^2\right ) \int \frac {\text {Li}_2(-e x)}{x} \, dx}{e}\\ &=2 a b n x-4 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2-\frac {2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2(-e x)}{e}-\frac {2 b^2 n^2 \text {Li}_3(-e x)}{e}+\frac {\left (2 b^2 n^2\right ) \int \frac {(1+e x) \log (1+e x)}{x} \, dx}{e}\\ &=2 a b n x-4 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2-\frac {2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2(-e x)}{e}-\frac {2 b^2 n^2 \text {Li}_3(-e x)}{e}+\frac {\left (2 b^2 n^2\right ) \text {Subst}\left (\int \frac {x \log (x)}{-\frac {1}{e}+\frac {x}{e}} \, dx,x,1+e x\right )}{e^2}\\ &=2 a b n x-4 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2-\frac {2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2(-e x)}{e}-\frac {2 b^2 n^2 \text {Li}_3(-e x)}{e}+\frac {\left (2 b^2 n^2\right ) \text {Subst}\left (\int \left (e \log (x)+\frac {e \log (x)}{-1+x}\right ) \, dx,x,1+e x\right )}{e^2}\\ &=2 a b n x-4 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2-\frac {2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2(-e x)}{e}-\frac {2 b^2 n^2 \text {Li}_3(-e x)}{e}+\frac {\left (2 b^2 n^2\right ) \text {Subst}(\int \log (x) \, dx,x,1+e x)}{e}+\frac {\left (2 b^2 n^2\right ) \text {Subst}\left (\int \frac {\log (x)}{-1+x} \, dx,x,1+e x\right )}{e}\\ &=2 a b n x-6 b^2 n^2 x+2 b^2 n x \log \left (c x^n\right )+2 b n x \left (a+b \log \left (c x^n\right )\right )-x \left (a+b \log \left (c x^n\right )\right )^2+\frac {2 b^2 n^2 (1+e x) \log (1+e x)}{e}-\frac {2 b n (1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right )^2 \log (1+e x)}{e}-\frac {2 b^2 n^2 \text {Li}_2(-e x)}{e}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2(-e x)}{e}-\frac {2 b^2 n^2 \text {Li}_3(-e x)}{e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 294, normalized size = 1.52 \begin {gather*} \frac {-a^2 e x+4 a b e n x-6 b^2 e n^2 x-2 a b e x \log \left (c x^n\right )+4 b^2 e n x \log \left (c x^n\right )-b^2 e x \log ^2\left (c x^n\right )+a^2 \log (1+e x)-2 a b n \log (1+e x)+2 b^2 n^2 \log (1+e x)+a^2 e x \log (1+e x)-2 a b e n x \log (1+e x)+2 b^2 e n^2 x \log (1+e x)+2 a b \log \left (c x^n\right ) \log (1+e x)-2 b^2 n \log \left (c x^n\right ) \log (1+e x)+2 a b e x \log \left (c x^n\right ) \log (1+e x)-2 b^2 e n x \log \left (c x^n\right ) \log (1+e x)+b^2 \log ^2\left (c x^n\right ) \log (1+e x)+b^2 e x \log ^2\left (c x^n\right ) \log (1+e x)+2 b n \left (a-b n+b \log \left (c x^n\right )\right ) \text {Li}_2(-e x)-2 b^2 n^2 \text {Li}_3(-e x)}{e} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2*Log[1 + e*x],x]

[Out]

(-(a^2*e*x) + 4*a*b*e*n*x - 6*b^2*e*n^2*x - 2*a*b*e*x*Log[c*x^n] + 4*b^2*e*n*x*Log[c*x^n] - b^2*e*x*Log[c*x^n]
^2 + a^2*Log[1 + e*x] - 2*a*b*n*Log[1 + e*x] + 2*b^2*n^2*Log[1 + e*x] + a^2*e*x*Log[1 + e*x] - 2*a*b*e*n*x*Log
[1 + e*x] + 2*b^2*e*n^2*x*Log[1 + e*x] + 2*a*b*Log[c*x^n]*Log[1 + e*x] - 2*b^2*n*Log[c*x^n]*Log[1 + e*x] + 2*a
*b*e*x*Log[c*x^n]*Log[1 + e*x] - 2*b^2*e*n*x*Log[c*x^n]*Log[1 + e*x] + b^2*Log[c*x^n]^2*Log[1 + e*x] + b^2*e*x
*Log[c*x^n]^2*Log[1 + e*x] + 2*b*n*(a - b*n + b*Log[c*x^n])*PolyLog[2, -(e*x)] - 2*b^2*n^2*PolyLog[3, -(e*x)])
/e

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \left (a +b \ln \left (c \,x^{n}\right )\right )^{2} \ln \left (e x +1\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2*ln(e*x+1),x)

[Out]

int((a+b*ln(c*x^n))^2*ln(e*x+1),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(e*x+1),x, algorithm="maxima")

[Out]

-(b^2*x*e - (b^2*x*e + b^2)*log(x*e + 1))*e^(-1)*log(x^n)^2 + e^(-1)*integrate(((b^2*log(c)^2 + 2*a*b*log(c) +
 a^2)*x*e*log(x*e + 1) + 2*(b^2*n*x*e - (b^2*n + (b^2*(n - log(c)) - a*b)*x*e)*log(x*e + 1))*log(x^n))/x, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(e*x+1),x, algorithm="fricas")

[Out]

integral(b^2*log(c*x^n)^2*log(x*e + 1) + 2*a*b*log(c*x^n)*log(x*e + 1) + a^2*log(x*e + 1), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \log {\left (c x^{n} \right )}\right )^{2} \log {\left (e x + 1 \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2*ln(e*x+1),x)

[Out]

Integral((a + b*log(c*x**n))**2*log(e*x + 1), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(e*x+1),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2*log(x*e + 1), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \ln \left (e\,x+1\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2 \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(e*x + 1)*(a + b*log(c*x^n))^2,x)

[Out]

int(log(e*x + 1)*(a + b*log(c*x^n))^2, x)

________________________________________________________________________________________